{extend name="public:default" /}

<!-- 搜索栏 -->
{block name="inputBtn"}
    
    <div class="layui-inline marSelect">
        <div class="layui-input-inline">
        <select name="agency_system_app_is_show">
            <option value="">是否显示</option>
            <option value="0">no</option>
            <option value="1">yes</option>
        </select>
        </div>
    </div>
    <br>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>代理ID</legend>
            <input type="text" name="agency_system_app_wid" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>添加时间</legend>
            <input type="text" name="agency_system_app_times" placeholder="点此选择" class="layui-input" id="test-laydate-range-datetime" lay-key="1" readonly>
        </fieldset>
    </div>
    
{/block}

<!-- 头工具栏 -->
{block name="tableTopBtn"}

    <button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del"><i class="layui-icon"></i></button>
    <button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="add"><i class="layui-icon"></i></button>
{/block}

<!-- 行工具栏 -->
{block name="tableEndBtn"}

    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit"><i class="layui-icon"></i></a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon"></i></a>

{/block}


<!-- js 执行方法 -->
{block name="script"}
    <script>
        var editList = window.location.pathname // 列表链接
        var editAdd = editList + 'Add' // 添加链接
        var editUp = editList + 'Up' // 修改链接
        var editDel = editList + 'Del' // 删除链接
        
        views.setUrl(editAdd,editDel,editUp).cols({
            url: editList,
            page: true,
            cols: [
                {type: 'checkbox', fixed: 'left'}

                ,{field:'id', title:'ID', align:'center'}
                ,{field:'agency_system_app_wid', title:'代理ID', align:'center'}
                ,{field:'agency_system_app_aid', title:'应用ID', align:'center'}
                ,{field:'agency_system_app_name', title:'应用名称', align:'center'}
                ,{field:'agency_system_app_is_show',title:'是否显示',align:'center'
                    , templet:function(d)
                    {
                        return d.agency_system_app_times ? '展示' : '隐藏' ;
                    }
                }
                ,{field:'agency_system_app_times', title:'添加时间', align:'center'
                    , templet:function(d)
                    { 
                        return d.agency_system_app_times ? layui.util.toDateString(d.agency_system_app_times * 1000) : '' ; 
                    }
                }

                ,{fixed: 'right', title:'操作', toolbar: '#test-table-toolbar-barDemo', width:100}
            ]

        }).toolbar(function(obj,data,table){
            // 头工具栏事件

        }).tool(function(obj,table){
            //监听行工具事件

        }).get();

        
        
    </script>
{/block}
  
  